package com.dlc.shop.sys.multishop.controller;


import com.dlc.shop.common.bean.Quick100;
import com.dlc.shop.common.config.Constant;
import com.dlc.shop.common.response.ServerResponseEntity;
import com.dlc.shop.service.SysConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenlin
 */
@Tag(name = "商家系统配置")
@RestController
@RequestMapping("/sys/shopConfig")
@RequiredArgsConstructor
public class ShopSysConfigController {

    private final SysConfigService sysConfigService;

    @GetMapping("/quick100")
    @Operation(summary = "获取快递100配置", description = "获取快递100配置")
    public ServerResponseEntity<Boolean> getQuick100() {
        Quick100 quick100 = sysConfigService.getSysConfigObject(Constant.QUICK100_CONFIG, Quick100.class);
        return ServerResponseEntity.success(quick100.getIsPrint());
    }
}
